<template>
    <section class="content">
        <navbar :title="$t('h_title.zizhufuwu_list')" :right_show="true" :type="1" ref="navbar"></navbar>
        <section class="nav" v-if="list.length > 0 || loading == true">
            <router-link :to="'/zizhufuwu_detail?id=' + item.id" v-for="(item,index) in list">{{item.title}}</router-link>
        </section>
        <section class="no_data" v-else>{{$t('common.zanwujilv')}}</section>
    </section>
</template>

<script>
    import navbar from "@/components/navbar"
    export default {
        name: "zizhufuwu_list",
        components: {
            navbar
        },
        data() {
            return {
                list :[],
                loading: false
            }
        },
        mounted() {
            this.load()
        },
        methods: {
            load(){
                this.loading = true
                this.$https.fetchGet('/m/article_type',{id: this.$route.query.id}).then(res => {
                    this.list = res.data.data
                    this.loading = false
                })
            }
        }
    }
</script>

<style scoped lang="less">
.nav{
    padding: .3rem;
    a{
        padding: 0 .4rem;
        font-size: .44rem;
        color: #fff;
        display: block;
        background: linear-gradient(#2c3134, #24292c);
        line-height: 1.2rem;
        border-radius: .2rem;
        margin-bottom: .2rem;
        text-align: left;
    }
}
</style>
